﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using WebApiFirst.Entity;

namespace WebApiFirst.Config
{
    public class StudentConfig : IEntityTypeConfiguration<Student>
    {
        public void Configure(EntityTypeBuilder<Student> builder)
        {
            builder.ToTable("T_Student").ToTable(p => p.HasComment("测试表")).HasKey(p=>p.Id);
            builder.HasQueryFilter(p => p.IsDelete == false);
        }
    }
}
